{
 "metadata": {
  "name": "",
  "signature": "sha256:74e0ad2f4b638e46c9fecaa6826bb4546730cdb2ae9c6231b77fef300bfe434e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Using DTW to compare sounds "
     ]
    },
    {
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "Using [librosa](https://github.com/bmcfee/librosa/) for instance, you can easily extract the MFCC of sound."
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Compute the MFCCs of two sounds"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import librosa\n",
      "\n",
      "y1, sr1 = librosa.load('../../Downloads/tmp/sounds/10.wav')\n",
      "y2, sr2 = librosa.load('../../Downloads/tmp/sounds/78.wav')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "%pylab inline\n",
      "\n",
      "subplot(1, 2, 1)\n",
      "mfcc1 = librosa.feature.mfcc(y1, sr1)\n",
      "librosa.display.specshow(mfcc1)\n",
      "\n",
      "subplot(1, 2, 2)\n",
      "mfcc2 = librosa.feature.mfcc(y2, sr2)\n",
      "librosa.display.specshow(mfcc2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Populating the interactive namespace from numpy and matplotlib\n"
       ]
      },
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 2,
       "text": [
        "<matplotlib.image.AxesImage at 0x11276bd10>"
       ]
      },
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAV0AAADtCAYAAAAcNaZ2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFJBJREFUeJzt3c2PXGdWx/Gn6lZ1dbXbbrudOPIkM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7r\nbN/8vG4vPrk/deutTFZ3OK7jdjde8q2kX//hd7fTr772wnZ6TyKppw/qDKGNIs8mC7fe9NzPX+hL\nRnFtcpkbM71a1fnMwdDHAu16PbO/8RWfd3zhW3XLeXvcd//rM7feX/3532+nP/3w59vpa9d82/s3\n//g3t9Ovvf7yznNIKaV7n9RR7slZfb0envrW1Sf369bYH//03nb6g5+969ZbLk37+E19XYbDkVuv\n13t0nf7xo79IqfwMPimb1wd/UM9s8u2z12ufw7Xnl1JKv/aD33Pzf/hnv+vmn3/xyG+vOd+Cs1Of\nia0q/7y//D3/3l058JFVvffnEq+/f/fMzb/1D++4+em0mZ//4e98382Pxj5Hq8/58a0rbn4oudwv\nTyT3K46u63PkH535wp/T5KF/tx985s/xzke+BfvHH/j37X9+4luuv//2+35/Dz71x5/X3wH498nf\nptTybPObLgAEougCQCCKLgAEougCQCCKLgAEougCQCCKLgAEougCQCCKLgAEougCQKBSBPOtlNKb\nAePA/0//nFL60VM69luJZxtPztN8tgEAAAAAAAAAAAAAADL+FzQaFvldBvRnAAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x112518f10>"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Compare them using DTW"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from dtw import dtw"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from numpy.linalg import norm\n",
      "dist, cost, acc_cost, path = dtw(mfcc1.T, mfcc2.T, dist=lambda x, y: norm(x - y, ord=1))\n",
      "print 'Normalized distance between the two sounds:', dist"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Normalized distance between the two sounds: 192.489808008\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "imshow(cost.T, origin='lower', cmap=cm.gray, interpolation='nearest')\n",
      "plot(path[0], path[1], 'w')\n",
      "xlim((-0.5, cost.shape[0]-0.5))\n",
      "ylim((-0.5, cost.shape[1]-0.5))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 5,
       "text": [
        "(-0.5, 37.5)"
       ]
      },
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAASsAAAD7CAYAAAAy7bIvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHU5JREFUeJzt3X2QVNWdxvEvjdDd070xlWgBCURNlcTNmCrcXUll8yLZ\nki2XSF6qUtlN1e6arWTLJPISMQY18RXLF1KgIUGMJSiwBnmJiyLsRrPRhFRlTdwFAzMM4ygwQhC3\nWOOaIILI/nG7hzsz90zfX/e5/XL7+VRNMX24c/vcnubh3Pvrcy6IiIiIiIiIiIiIiIiIiIiIpM+F\nF154EtCXvvSlL9PXueeee5IIo6IaPTnZ29sLwJIlS5gzZw4Ab775ZuTGr7/+emT7a6+9Ftn+6quv\nRra/8cYb8Tt4MvI1cba7HD9+fOD7xx9/nEsvvRSA3//+95HbZzKZyPbRo0ebth81yvbre+utt4a1\n/eEPf4jc1vUavP322wPf/+IXv+ATn/jEiM8Z3j4O17FaXzNX+2mnnRZ73+H35M9//nMuuugiAE6c\nOBG5vUvUcwKMGTPGy/bW981I76ctW7YwY8aMgTbrvwXXe3KkvowePXrQa/q1r30NIrIpeg8iInVQ\nKBT4/Oc/z7vf/e6K2yqsRKQhCoUCM2fOZPfu3Rw+fLji9nUJqw9/+MP1eJqmMHny5EZ3oW7OOuus\nRnehbtrlWM8999y6PE+hUOAzn/kMPT09bN++PdbPRJ8ce1K+XnHhhRcOfO86B3ZdB4i6zjJSe/j6\nUSXW83GX8HOec845A4+PHTsWub31GpTrmoRre9dxRb1mrmuIca7nT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6W4CL7MCdPnmyb\noBIRu2nTpjFt2rSBxzfffHPkdtWG1VvALOAnBJXB5Qy5uC4i4lOSk8ieBi5KcP8ikk4/B6Y1uhMi\nIiIiIiKSelXNIWwRK4BDwI5Q27uAJ4Fe4AngnQ3ol2+TgKeALmAnMKfUnsZjzQHPANuBbqD84cA0\nHmvZaGAbsKn0OM3H6jSaYFrO2cAYgjdAxTmELeTjwAUMDquFwLdK388H7qh3pxIwHphS+r4I7Cb4\nPabxWAE6Sn+eBvwn8DHSe6wA84CHgMdKj9N8rE4fAf499Pia0leanM3gsOoBxpW+H196nDYbgYtJ\n/7F2AL8BOknvsU4Efgp8klMjq6Y81qTXszLNIUyJcQSnhpT+HDfCtq3obILR5DOk91gzBGcBhzh1\n+pvWY70LuBoIz6JvymNNOqzae5p4cPxpeg2KwI+BucDrQ/4uTcf6NsFp70TgEwSjjrC0HOulwCsE\n16tcn7lsmmNNOqxizyFMkUMEQ2eACQRvhjQYQxBUqwlOAyG9x1r2GrAZ+HPSeax/CXwa2AOsAf6K\n4PfblMeadFiF5xCOJZhD+NhIP5ACjwGXlb6/jFP/sFvZKIIpVd1AeHnXNB7rGZyqfuWB6QQjjzQe\n63UEA4hzgL8Dfgb8A+k81lj+hqB61Adc2+C++LaGYCL3MYJrc/9EUPb9Kekq+36M4NRoO8E/3G0E\nH0lJ47F+CPhvgmP9LcH1HEjnsYZdxKmBRNqPVUREREREREREREREREREREREREREGuX/AbxyScjQ\nNdoMAAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x112743110>"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [],
     "language": "python",
     "metadata": {},
     "outputs": []
    }
   ],
   "metadata": {}
  }
 ]
}
